<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>解析window对象(实例)</title>
    </head>
    <body>

        <h1>解析window对象(实例)</h1>

        <script type="text/javascript">
            console.log( window === this );
            console.log( globalThis === window );

            console.log( '- - - '.repeat(10) );

            let names = Object.getOwnPropertyNames( window );
            names.forEach( name => console.log(name) );
            console.log( names.length );
        </script>
        
    </body>
</html>